export default (app) => {
    app.config.globalProperties.$global = {}


    app.config.globalProperties.$formatCol = (column) => {
        column.forEach(item => {
            if(item.type == 'index') {
                item.width = item.width || '50px'
                if(!item.customRender) item.customRender = ({ index }) => (<span>{index + 1}</span>);
            }
            item.align = item.align || 'center'
        })
        return column
    }


}
